package com.andy.wang.mapper;

import com.andy.wang.pojo.Room;
import com.andy.wang.pojo.User;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.List;

/**
* @author 王更元
* @description 针对表【room(聊天房)】的数据库操作Mapper
* @createDate 2024-04-12 09:26:35
* @Entity com.andy.wang.pojo.Room
*/
public interface RoomMapper extends BaseMapper<Room>{
    List<Room> selectUhobbys(@Param("hobbys") String hobbys);
    List<Room> getIntelligenceRoom(@Param("hobbys") String[] hobbys);
    List<Room> getRNameAndUName(@Param("hobbys") String hobbys);



    // 获取全部房间
    List<Room> getRooms(@Param("uIds")ArrayList<Integer> uIds);

    // 房间用户信息
    List<User> getRoomUsers(@Param("rID") int rID);

    // 获取房间主键ID
    int last();

    // 获取创建完房间的信息
    Room AllShuJu(@Param("rID")Integer rID);


}




